package com.ruoyi.project.remake.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.remake.mapper.CaseMainThridMapper;
import com.ruoyi.project.remake.domain.CaseMainThrid;
import com.ruoyi.project.remake.service.ICaseMainThridService;

/**
 * 第三方对接模块Service业务层处理
 * 
 * @author 孙山伟
 * @date 2023-05-27
 */
@Service
public class CaseMainThridServiceImpl implements ICaseMainThridService 
{
    @Autowired
    private CaseMainThridMapper caseMainThridMapper;

    /**
     * 查询第三方对接模块
     * 
     * @param id 第三方对接模块ID
     * @return 第三方对接模块
     */
    @Override
    public CaseMainThrid selectCaseMainThridById(Long id)
    {
        return caseMainThridMapper.selectCaseMainThridById(id);
    }

    /**
     * 查询第三方对接模块列表
     * 
     * @param caseMainThrid 第三方对接模块
     * @return 第三方对接模块
     */
    @Override
    public List<CaseMainThrid> selectCaseMainThridList(CaseMainThrid caseMainThrid)
    {
        return caseMainThridMapper.selectCaseMainThridList(caseMainThrid);
    }

    /**
     * 新增第三方对接模块
     * 
     * @param caseMainThrid 第三方对接模块
     * @return 结果
     */
    @Override
    public int insertCaseMainThrid(CaseMainThrid caseMainThrid)
    {
        caseMainThrid.setCreateTime(DateUtils.getNowDate());
        return caseMainThridMapper.insertCaseMainThrid(caseMainThrid);
    }

    /**
     * 修改第三方对接模块
     * 
     * @param caseMainThrid 第三方对接模块
     * @return 结果
     */
    @Override
    public int updateCaseMainThrid(CaseMainThrid caseMainThrid)
    {
        caseMainThrid.setUpdateTime(DateUtils.getNowDate());
        return caseMainThridMapper.updateCaseMainThrid(caseMainThrid);
    }

    /**
     * 批量删除第三方对接模块
     * 
     * @param ids 需要删除的第三方对接模块ID
     * @return 结果
     */
    @Override
    public int deleteCaseMainThridByIds(Long[] ids)
    {
        return caseMainThridMapper.deleteCaseMainThridByIds(ids);
    }

    /**
     * 删除第三方对接模块信息
     * 
     * @param id 第三方对接模块ID
     * @return 结果
     */
    @Override
    public int deleteCaseMainThridById(Long id)
    {
        return caseMainThridMapper.deleteCaseMainThridById(id);
    }
}
